<!doctype html>
<html>
  <head>
    <meta charset="UTF-8">
    <meta name="viewport" content="maximum-scale=1.0,minimum-scale=1.0,user-scalable=0,width=device-width,initial-scale=1.0"/>
    <title>舆情工作平台</title>
    <meta name="format-detection" content="telephone=no"/>
    <link rel="stylesheet" type="text/css" href="../css/api.css" />
    <link rel="stylesheet" type="text/css" href="../css/common.css" />   
    <style>     
     
     /* 头部样式 */
     .topbar {background: #3A8B7A; height:50px; }
     #title { color:#FFF;} 
     .swipe {line-height: 50px;margin-right: 10px;color: #FF8400;}
     .back {float: left; padding-right: 30px;}
     .back img {height: 30px;margin-top: 10px;margin-left: 10px;}
     .topbar .title {line-height: 50px; font-size: 22px;  position: absolute; left: 50%; -webkit-transform: translateX(-50%);transform: translateX(-50%);}
      
     /* 底部切换按钮样式 */
      #footer{
            height: 50px;
            background-color: #9f9f9f;
            width: 100%;
            text-align: center;
            display: -webkit-box;
            display: -webkit-flex;
            display: flex;
            border-top:1px solid #dbdcdc;
            -webkit-box-orient: horizontal;
            -webkit-flex-flow: row;
            flex-flow: row;
        }
        #footer span{
            display: block; 
            line-height: 50px;
            font-size: 14px;       
            -webkit-box-flex: 1;
            -webkit-flex: 1;
            flex: 1;
            background-repeat: no-repeat;
            background-position: center 10px;
            background-size: 36px !important;
            -webkit-background-size: 36px !important;
            color:#fff;
        }
        /*#footer span.active, #footer span.act{*/
            /*background-color: #2dbd82; color: #fff;*/
        /*}*/
        #footer span:last-child{
            border-right: 0;
        }
         
     
        #footer .preview.active, #footer .preview.act{
             background:#3A8B7A;
        }
        #footer .code.active, #footer .code.act{
             background:#3A8B7A;
        }
     

    </style>
  </head>
  <body>
    <div id="wrap">  
      <div class="titlebar activebar">
        <div id="thridHeader" class="topbar whitebar">
          <div class="back"  tapmode="" onclick="api.closeWin();"><img src="../image/btn/back.png" alt=""></div>
          <div class="title" id="title">舆情分析</div>
            </div>       
       </div>           
      <div id="main">       
      </div>      
      <div id="footer">         
           <span id ="preview" tapmode="active" onclick="goto_openTabFun(0)" class="preview act">舆情报告</span>
           <span id="code" tapmode="active" onclick="goto_openTabFun(1)" class="">数据统计</span> 
      </div>
    </div> 
  </body>
<script type="text/javascript" src="../script/api.js"></script>  
<script type="text/javascript" src="../script/alpenlicebe.js"></script>   
<script type="text/javascript" src="../script/zepto.min.js"></script>  
<script type="text/javascript" src="../script/hashes.min.js"></script>  
 
<script type="text/javascript">
	apiready = function(){     
		var header = $api.byId('thridHeader');       
     	$api.fixIos7Bar(header);      
        goto_openTabFun(0);             
    };
 
    function goto_openTabFun(openID){
 		var header = $api.byId('thridHeader');        
     	var headerOffset = $api.offset(header);
     	var footer = $api.byId('footer');
    	var footerPos = $api.offset(footer);
    	$("#preview").removeClass();
    	$("#code").removeClass();
    	api.closeFrameGroup({name: 'group_tjfx_bg'});
    	api.closeFrameGroup({name: 'group_tjfx_tj'});
		if(0==openID){
			$("#preview").addClass("preview act");  
			api.openFrame ({
		        name: 'tjfx_bg_Index',
		        url: './tjfx_bg_Index.html',
		        rect:{
		            x:0,
		            y:headerOffset.h,
		            w:'auto',
		            h:api.frameHeight-headerOffset.h-footerPos.h
		        },
		        pageParam: {winY:headerOffset.h,winH:api.frameHeight-headerOffset.h-footerPos.h},
		        delay: 300, 
		        bounces: false,
		     	reload: true,
		        showProgress: 'true'         
		    });
        }else{ 
            $("#code").addClass("preview act");  
            api.openFrame ({
		        name: 'tjfx_tj_Index',
		        url: './tjfx_tj_Index.html',
		        rect:{
		            x:0,
		            y:headerOffset.h,
		            w:'auto',
		            h:api.frameHeight-headerOffset.h-footerPos.h
		        },
		        pageParam: {winY:headerOffset.h,winH:api.frameHeight-headerOffset.h-footerPos.h},
		        delay: 300, 
		        bounces: false,
		     	reload: true,
		        showProgress: 'true'         
		    });
        }             
    }
</script>
</html>